import React, { Component } from 'react'
import Prompt from './Prompt'

export default class Page2 extends Component {
    state = {
        val: ""
    }
    render() {
        return (
            <div>
                <Prompt when={this.state.val} message="当前文本还没有保存是否跳转" />
                <textarea value={this.state.val} onChange={e => {
                    this.setState({ val: e.target.value })
                }} />
            </div>
        )
    }
}
